/**
 * 
 */
package t4j.generics;

import java.util.Arrays;


public class ArrayOfGeneric {

	static final int SIZE = 100;
	
	static Generic<Integer>[] gia;
	
	public static void main(String[] args) {
		
		//! gia = (Generic<Integer>[]) new Object[SIZE];//java.lang.ClassCastException
		
		gia = (Generic<Integer>[])new Generic[SIZE];
		
		System.out.println(gia.getClass().getSimpleName());
		
		gia[0] = new Generic<Integer>();
		//gia[1] = new Object(); //compile-time error 
		
		//gia[1] = new Generic<Double>(); 
		System.out.println(Arrays.toString(gia));
	
	}
}
